package com.iemp.bean.example;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class NewsExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public NewsExample() {
        oredCriteria = new ArrayList<>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andNewsIdIsNull() {
            addCriterion("news_id is null");
            return (Criteria) this;
        }

        public Criteria andNewsIdIsNotNull() {
            addCriterion("news_id is not null");
            return (Criteria) this;
        }

        public Criteria andNewsIdEqualTo(Integer value) {
            addCriterion("news_id =", value, "newsId");
            return (Criteria) this;
        }

        public Criteria andNewsIdNotEqualTo(Integer value) {
            addCriterion("news_id <>", value, "newsId");
            return (Criteria) this;
        }

        public Criteria andNewsIdGreaterThan(Integer value) {
            addCriterion("news_id >", value, "newsId");
            return (Criteria) this;
        }

        public Criteria andNewsIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("news_id >=", value, "newsId");
            return (Criteria) this;
        }

        public Criteria andNewsIdLessThan(Integer value) {
            addCriterion("news_id <", value, "newsId");
            return (Criteria) this;
        }

        public Criteria andNewsIdLessThanOrEqualTo(Integer value) {
            addCriterion("news_id <=", value, "newsId");
            return (Criteria) this;
        }

        public Criteria andNewsIdIn(List<Integer> values) {
            addCriterion("news_id in", values, "newsId");
            return (Criteria) this;
        }

        public Criteria andNewsIdNotIn(List<Integer> values) {
            addCriterion("news_id not in", values, "newsId");
            return (Criteria) this;
        }

        public Criteria andNewsIdBetween(Integer value1, Integer value2) {
            addCriterion("news_id between", value1, value2, "newsId");
            return (Criteria) this;
        }

        public Criteria andNewsIdNotBetween(Integer value1, Integer value2) {
            addCriterion("news_id not between", value1, value2, "newsId");
            return (Criteria) this;
        }

        public Criteria andNewsPublishTimeIsNull() {
            addCriterion("news_publish_time is null");
            return (Criteria) this;
        }

        public Criteria andNewsPublishTimeIsNotNull() {
            addCriterion("news_publish_time is not null");
            return (Criteria) this;
        }

        public Criteria andNewsPublishTimeEqualTo(Date value) {
            addCriterion("news_publish_time =", value, "newsPublishTime");
            return (Criteria) this;
        }

        public Criteria andNewsPublishTimeNotEqualTo(Date value) {
            addCriterion("news_publish_time <>", value, "newsPublishTime");
            return (Criteria) this;
        }

        public Criteria andNewsPublishTimeGreaterThan(Date value) {
            addCriterion("news_publish_time >", value, "newsPublishTime");
            return (Criteria) this;
        }

        public Criteria andNewsPublishTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("news_publish_time >=", value, "newsPublishTime");
            return (Criteria) this;
        }

        public Criteria andNewsPublishTimeLessThan(Date value) {
            addCriterion("news_publish_time <", value, "newsPublishTime");
            return (Criteria) this;
        }

        public Criteria andNewsPublishTimeLessThanOrEqualTo(Date value) {
            addCriterion("news_publish_time <=", value, "newsPublishTime");
            return (Criteria) this;
        }

        public Criteria andNewsPublishTimeIn(List<Date> values) {
            addCriterion("news_publish_time in", values, "newsPublishTime");
            return (Criteria) this;
        }

        public Criteria andNewsPublishTimeNotIn(List<Date> values) {
            addCriterion("news_publish_time not in", values, "newsPublishTime");
            return (Criteria) this;
        }

        public Criteria andNewsPublishTimeBetween(Date value1, Date value2) {
            addCriterion("news_publish_time between", value1, value2, "newsPublishTime");
            return (Criteria) this;
        }

        public Criteria andNewsPublishTimeNotBetween(Date value1, Date value2) {
            addCriterion("news_publish_time not between", value1, value2, "newsPublishTime");
            return (Criteria) this;
        }

        public Criteria andNewsStatusIsNull() {
            addCriterion("news_status is null");
            return (Criteria) this;
        }

        public Criteria andNewsStatusIsNotNull() {
            addCriterion("news_status is not null");
            return (Criteria) this;
        }

        public Criteria andNewsStatusEqualTo(Integer value) {
            addCriterion("news_status =", value, "newsStatus");
            return (Criteria) this;
        }

        public Criteria andNewsStatusNotEqualTo(Integer value) {
            addCriterion("news_status <>", value, "newsStatus");
            return (Criteria) this;
        }

        public Criteria andNewsStatusGreaterThan(Integer value) {
            addCriterion("news_status >", value, "newsStatus");
            return (Criteria) this;
        }

        public Criteria andNewsStatusGreaterThanOrEqualTo(Integer value) {
            addCriterion("news_status >=", value, "newsStatus");
            return (Criteria) this;
        }

        public Criteria andNewsStatusLessThan(Integer value) {
            addCriterion("news_status <", value, "newsStatus");
            return (Criteria) this;
        }

        public Criteria andNewsStatusLessThanOrEqualTo(Integer value) {
            addCriterion("news_status <=", value, "newsStatus");
            return (Criteria) this;
        }

        public Criteria andNewsStatusIn(List<Integer> values) {
            addCriterion("news_status in", values, "newsStatus");
            return (Criteria) this;
        }

        public Criteria andNewsStatusNotIn(List<Integer> values) {
            addCriterion("news_status not in", values, "newsStatus");
            return (Criteria) this;
        }

        public Criteria andNewsStatusBetween(Integer value1, Integer value2) {
            addCriterion("news_status between", value1, value2, "newsStatus");
            return (Criteria) this;
        }

        public Criteria andNewsStatusNotBetween(Integer value1, Integer value2) {
            addCriterion("news_status not between", value1, value2, "newsStatus");
            return (Criteria) this;
        }

        public Criteria andNewsTittleIsNull() {
            addCriterion("news_tittle is null");
            return (Criteria) this;
        }

        public Criteria andNewsTittleIsNotNull() {
            addCriterion("news_tittle is not null");
            return (Criteria) this;
        }

        public Criteria andNewsTittleEqualTo(String value) {
            addCriterion("news_tittle =", value, "newsTittle");
            return (Criteria) this;
        }

        public Criteria andNewsTittleNotEqualTo(String value) {
            addCriterion("news_tittle <>", value, "newsTittle");
            return (Criteria) this;
        }

        public Criteria andNewsTittleGreaterThan(String value) {
            addCriterion("news_tittle >", value, "newsTittle");
            return (Criteria) this;
        }

        public Criteria andNewsTittleGreaterThanOrEqualTo(String value) {
            addCriterion("news_tittle >=", value, "newsTittle");
            return (Criteria) this;
        }

        public Criteria andNewsTittleLessThan(String value) {
            addCriterion("news_tittle <", value, "newsTittle");
            return (Criteria) this;
        }

        public Criteria andNewsTittleLessThanOrEqualTo(String value) {
            addCriterion("news_tittle <=", value, "newsTittle");
            return (Criteria) this;
        }

        public Criteria andNewsTittleLike(String value) {
            addCriterion("news_tittle like", value, "newsTittle");
            return (Criteria) this;
        }

        public Criteria andNewsTittleNotLike(String value) {
            addCriterion("news_tittle not like", value, "newsTittle");
            return (Criteria) this;
        }

        public Criteria andNewsTittleIn(List<String> values) {
            addCriterion("news_tittle in", values, "newsTittle");
            return (Criteria) this;
        }

        public Criteria andNewsTittleNotIn(List<String> values) {
            addCriterion("news_tittle not in", values, "newsTittle");
            return (Criteria) this;
        }

        public Criteria andNewsTittleBetween(String value1, String value2) {
            addCriterion("news_tittle between", value1, value2, "newsTittle");
            return (Criteria) this;
        }

        public Criteria andNewsTittleNotBetween(String value1, String value2) {
            addCriterion("news_tittle not between", value1, value2, "newsTittle");
            return (Criteria) this;
        }

        public Criteria andNewsAccountIdIsNull() {
            addCriterion("news_account_id is null");
            return (Criteria) this;
        }

        public Criteria andNewsAccountIdIsNotNull() {
            addCriterion("news_account_id is not null");
            return (Criteria) this;
        }

        public Criteria andNewsAccountIdEqualTo(Integer value) {
            addCriterion("news_account_id =", value, "newsAccountId");
            return (Criteria) this;
        }

        public Criteria andNewsAccountIdNotEqualTo(Integer value) {
            addCriterion("news_account_id <>", value, "newsAccountId");
            return (Criteria) this;
        }

        public Criteria andNewsAccountIdGreaterThan(Integer value) {
            addCriterion("news_account_id >", value, "newsAccountId");
            return (Criteria) this;
        }

        public Criteria andNewsAccountIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("news_account_id >=", value, "newsAccountId");
            return (Criteria) this;
        }

        public Criteria andNewsAccountIdLessThan(Integer value) {
            addCriterion("news_account_id <", value, "newsAccountId");
            return (Criteria) this;
        }

        public Criteria andNewsAccountIdLessThanOrEqualTo(Integer value) {
            addCriterion("news_account_id <=", value, "newsAccountId");
            return (Criteria) this;
        }

        public Criteria andNewsAccountIdIn(List<Integer> values) {
            addCriterion("news_account_id in", values, "newsAccountId");
            return (Criteria) this;
        }

        public Criteria andNewsAccountIdNotIn(List<Integer> values) {
            addCriterion("news_account_id not in", values, "newsAccountId");
            return (Criteria) this;
        }

        public Criteria andNewsAccountIdBetween(Integer value1, Integer value2) {
            addCriterion("news_account_id between", value1, value2, "newsAccountId");
            return (Criteria) this;
        }

        public Criteria andNewsAccountIdNotBetween(Integer value1, Integer value2) {
            addCriterion("news_account_id not between", value1, value2, "newsAccountId");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {
        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}